#version 120
#extension GL_EXT_geometry_shader4 : enable

/*
// varying inputs:
varying in vec4 gl_FrontColorIn[gl_VerticesIn];
varying in vec4 gl_BackColorIn[gl_VerticesIn];
varying in vec4 gl_FrontSecondaryColorIn[gl_VerticesIn];
varying in vec4 gl_BackSecondaryColorIn[gl_VerticesIn];
varying in vec4 gl_TexCoordIn[gl_VerticesIn][]; // at most will be
                                                // gl_MaxTextureCoords
varying in float gl_FogFragCoordIn[gl_VerticesIn];
varying in vec4 gl_PositionIn[gl_VerticesIn];
varying in float gl_PointSizeIn[gl_VerticesIn];
varying in vec4 gl_ClipVertexIn[gl_VerticesIn];

// varying outputs:
varying out vec4 gl_FrontColor;
varying out vec4 gl_BackColor;
varying out vec4 gl_FrontSecondaryColor;
varying out vec4 gl_BackSecondaryColor;
varying out vec4 gl_TexCoord[]; // at most gl_MaxTextureCoords
varying out float gl_FogFragCoord;

*/

// A passthrough geometry shader for color and position
void main()
{
  for( int i = 0; i < gl_VerticesIn; ++i )
  {
    // copy color
    gl_FrontColor	= gl_FrontColorIn[ i ];

   // gl_BackColor	= gl_BackColorIn[ i ];

   // gl_TexCoord		= gl_TexCoordIn[ i ];

    // copy position
    gl_Position		= gl_PositionIn[ i ];

    // done with the vertex
    EmitVertex();
  }

  //EndPrimitive();
}
